package net.cityside.summer.web.controller;

import java.util.Locale;

import javax.servlet.http.HttpServletRequest;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("home")
public class HomeController {

	private static final Logger logger = Logger.getLogger(HomeController.class);

	// 一定要加此注解，即便注解参数为空
	@RequestMapping
	public ModelAndView home(HttpServletRequest request, Locale locale) {
		logger.debug("request.locale=" + request.getLocale());
		logger.debug("locale=" + locale);

		ModelAndView mv = new ModelAndView("home");

		return mv;
	}
}
